package com.guigu.qingcheng.service_user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.qingcheng.pojo.user.TbAddress;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author testjava
 * @since 2020-07-08
 */
public interface TbAddressService extends IService<TbAddress> {

    //按条件查询
    List<TbAddress> findList(@RequestBody Map<String,Object> searchMap);

    //按条件查询分页
    Page<TbAddress> findPage(@RequestBody Map<String,Object> searchMap,@RequestParam("page") Integer page,@RequestParam("size") Integer size);

    /**
     * 根据用户名查询地址列表
     * @param username 用户名
     * @return 地址列表
     */
    public List<TbAddress> findByUsername(String username);

}
